import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { TotalQuery, TotalPageResult } from "./types";

// /**
//  * 获取码分页数据
//  *
//  * @param queryParams
//  */
// export function getTotalPage(
//   queryParams?: TotalQuery
// ): AxiosPromise<TotalPageResult> {
//   return request({
//     url: "/api/Order/Today",
//     method: "post",
//     data: queryParams,
//     // params: queryParams,
//   });
// }

/**
 * 获取码分页数据
 *
 * @param queryParams
 */
export function getTotalPage(
  queryParams?: TotalQuery
): AxiosPromise<TotalPageResult> {
  return request({
    url: "/api/Order/Hour",
    method: "post",
    data: queryParams,
    // params: queryParams,
  });
}
/**
 * 获取码下拉数据
 *
 * @param queryParams
 */
export function getTotalOptions(
  queryParams?: TotalQuery
): AxiosPromise<OptionType[]> {
  return request({
    url: "/api/v1/roles/options",
    method: "get",
    params: queryParams,
  });
}
